<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * Class CreateMedicalFamilyhistoryTable
 * 家族史数据库
 */
class CreateMedicalFamilyhistoryTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('st_medical_familyhistory', function (Blueprint $table) {
            $table->increments('id')->comment("病历家族史表");
            $table->unsignedInteger('record_id')->comment("关联medical_records_id");
            $table->text('diabetes')->nullable()->comment("亲属患糖尿病情况");
            $table->text('hypertension')->nullable()->comment("亲属患高血压情况");
            $table->text('chd')->nullable()->comment("coronary heart disease,亲属患冠心病的情况");
            $table->text('embolism')->nullable()->comment("亲属患脑梗情况");
            $table->text('hyperlipidemia')->nullable()->comment("亲属患高血脂的情况");
            $table->text('extend')->nullable()->comment("追加的情况");
            $table->string('remark')->default('')->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('st_medical_familyhistory');
    }
}
